package refactor.changeunidirectionalassociationtobidirectional;

public class Client {
    public void clientMethod() {
        Order order = new Order("1");
        Customer dayna = new Customer("dayna");
        order.setCustomer(dayna);
        System.out.println(order.state());
        //set customer daynaBaby to order 1
        Customer daynaBaby = new Customer("daynaBaby");
        order.setCustomer(daynaBaby);
        System.out.println(order.state());
        //add order2 for daynaBaby:1,2
        daynaBaby.addOrder(new Order("2"));
        System.out.println(daynaBaby.state());
        //
        System.out.println(dayna.state());
    }

    public static void main(String[] args) {
        new Client().clientMethod();
    }
}
